 <!DOCTYPE html>
 
<%@ page import="java.sql.*" %> 
<%@ page import="java.io.*" %> 
<%@ page import="java.util.Date" %> 
<%@ page import="java.text.DateFormat" %> 
<%@ page import="java.text.SimpleDateFormat" %> 


<html lang="en">
<head>
<script type="text/javascript">
	function sessionValueAssing(assignName, eDD, eMM, eYY, assignStatus, assignType, desc, class_group, file_name, late_penalty, subject_id){
		
		if(assignName != null && assignName != "")
		{
			
			window.open("page_temp.jsp?AssName=" + assignName + "&EndDD=" + eDD + "&EndMM=" + eMM + "&EndYY=" + eYY + "&AssStatus=" + assignStatus + "&AssType=" + assignType + "&Desc=" + desc + "&ClassGroup=" + class_group + "&FileName=" + file_name + "&LatePenalty=" + late_penalty + "&SubjectID=" + subject_id);
			document.forms["assignCreateFrom"].submit();
		}else
		{
			alert("Please input the Assignment Name");
			return;
		}
	}
	
	function getlatePenalty(_value)
	{
		//var _chk = document.getElementsByName("datLatePenalty");
	
		if(_value.checked == true)
		{
			document.getElementsByName("datLatePenalty")[0].value = "1";
		}else{
			document.getElementsByName("datLatePenalty")[0].value = "0";
		}
	}
</script>
<link rel="stylesheet" type="text/css" href="common.css">
<title>Assignmenr Create</title>
</head>
<body>
<form action="assignmentCreation.jsp" method="post" id="assignCreateFrom" name="entry" ENCTYPE="multipart/form-data" onSubmit="return validate(this)">
<table class="TblBody" style="width:720px">
	<tr>
		<td>
			<div class="contentb">
				<table width="100%">
                    <tr>
                        <td style="background-color:#ccff99; font-size:20px; font-weight:bold; height:30px">Assignment Create</td>
                    </tr>
					<tr>
                        <td>
                            <table width="100%">
                                <tr>
                                    <td style="width:16%">Assignment Name</td>
                                    <td>
										<input name="txtAssignmentName" type="text" />
									</td>
                                </tr>
                                <tr>
                                    <td>End Date</td>
                                    <td>
                                        <select name="cboEndDateDD">
                                            <option value="1">01</option>
                                            <option value="2">02</option>
											<option value="3">03</option>
											<option value="4">04</option>
											<option value="5">05</option>
											<option value="6">06</option>
											<option value="7">07</option>
											<option value="8">08</option>
											<option value="9">09</option>
											<option value="10">10</option>
											<option value="11">11</option>
											<option value="12">12</option>
											<option value="13">13</option>
											<option value="14">14</option>
											<option value="15">15</option>
											<option value="16">16</option>
											<option value="17">17</option>
											<option value="18">18</option>
											<option value="19">19</option>
											<option value="20">20</option>
											<option value="21">21</option>
											<option value="22">22</option>
											<option value="23">23</option>
											<option value="24">24</option>
											<option value="25">25</option>
											<option value="26">26</option>
											<option value="27">27</option>
											<option value="28">28</option>
											<option value="29">29</option>
											<option value="30">30</option>
											<option value="31">31</option>
                                        </select>
                                        &nbsp; / &nbsp;
                                        <select name="cboEndDateMM">
                                            <option value="1">01</option>
                                            <option value="2">02</option>
											<option value="3">03</option>
											<option value="4">04</option>
											<option value="5">05</option>
											<option value="6">06</option>
											<option value="7">07</option>
											<option value="8">08</option>
											<option value="9">09</option>
											<option value="10">10</option>
											<option value="11">11</option>
											<option value="12">12</option>
                                        </select>
                                        &nbsp; / &nbsp;
                                        <select name="cboEndDateYY">
                                            <option value="2011">2011</option>
                                            <option value="2012">2012</option>
											<option value="2013">2013</option>
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <td>Assigment Status</td>
                                    <td>
                                        <select name="cboAssigStatus">
                                            <option value="1">Open</option>
                                            <option value="0">Close</option>
                                        </select>
                                    </td>
                                </tr>
								<tr>
									<td>Assignment Type</td>
									<td>
									<select name="cboAssignmentType">
                                            <option value="1">local</option>
											<option value="2">Team</option>
                                     </select>
									 </td>
								</tr>
								<tr>
									<td>Late Penalty</td>
									<td>
										<input type="hidden" name="datLatePenalty" value="0">
										<input type="checkbox" onClick="getlatePenalty(this)" name="chkLatePenalty" />
									</td>
								</tr>
                                <tr>
                                    <td>Specification</td>
                                    <td>
										<input name="spec_assignment" type="file" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>Description</td>
                                    <td>
                                        <textarea name="txtdescription" cols="50" rows="7"></textarea>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <input id="btnSubmit" type="button" onClick="sessionValueAssing(txtAssignmentName.value, cboEndDateDD.value, cboEndDateMM.value, cboEndDateYY.value, cboAssigStatus.value, cboAssignmentType.value, txtdescription.value, 0, spec_assignment.value, datLatePenalty.value, <%=request.getParameter("SubjectID")%>)" value="Submit" />&nbsp;&nbsp;
                                        <input id="btnReset" type="reset" value="reset" />
                                    </td>
                                </tr>
                            </table>
                        </td>
					</tr>
				</table>
			</div>
		</td>
	</tr>
</table>
</form>
</body>
</html>